<template>
	<view>
		<view class="safe-padding custom-title">店铺管理</view>
		<!-- <u-cell-group>
			<u-cell title="商品分类管理" isLink clickable url="/pages/admin/manage/pages/goodsType"></u-cell>
			<u-cell title="商品信息管理" isLink clickable url="/pages/admin/manage/pages/goodsManage/index"></u-cell>
			<u-cell title="缺货商品管理" isLink clickable url="/pages/admin/manage/pages/goodsLack"></u-cell>
			<u-cell title="商品出库" isLink clickable url="/pages/admin/manage/pages/goodsOutbound/index"></u-cell>
		</u-cell-group> -->
		<view class="fun-btn-content">
			<view v-for="item in funBtnList" :key="item.url" class="fun-btn" @click="onNavigateToPage(item.url)">
				<u-icon :name="item.icon" color="#9dae8a" size="36"></u-icon>
				<view class="fun-btn-title">{{ item.title }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		created() {
			this.initFunBtnList();
		},
		data() {
			return {
				funBtnList: []
			}
		},
		methods: {
			initFunBtnList() {
				this.funBtnList = [
					{
						title: '分类管理',
						url: '/pages/admin/manage/pages/goodsType',
						icon: 'list'
					},
					{
						title: '库存管理',
						url: '/pages/admin/manage/pages/goodsManage/index',
						icon: 'home'
					},
					{
						title: '缺货查询',
						url: '/pages/admin/manage/pages/goodsLack',
						icon: 'error'
					},
					{
						title: '商品出库',
						url: '/pages/admin/manage/pages/goodsOutbound/index',
						icon: 'bag'
					}
				]
			},
			onNavigateToPage(url) {
				uni.navigateTo({ url });
			}
		}
	}
</script>

<style lang="scss">
.custom-title {
	background-color: $green-bg-color;
}
.fun-btn-content {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	.fun-btn {
		width: 300rpx;
		height: 300rpx;
		margin: 24rpx;
		display: flex;
		border-radius: 24rpx;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		box-shadow: 0 0 16px 4px rgba(0,0,0,0.1);
		.fun-btn-title {
			font-weight: bold;
			margin-top: 8px;
			letter-spacing: 1px;
		}
	}
}
</style>
